﻿using Electronic_work_order.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Electronic_work_order.Interfacess.OA_Demand
{
    public class SqlDemand : IDemand
    {
        private readonly AppDbContext _context;

        public SqlDemand(AppDbContext context)
        {
            _context = context;
        }

        public int AddDemand(Demand de)
        {
             _context.demand.Add(de);
            return _context.SaveChanges();
        }
    }
}
